/**
 * 菜单状态
 */
export const useMenuOpen = ():Ref<boolean> => useState<boolean>('menuOpen', () => false)
/**
 * 权限校验
 */
export const useValidateAuth = ():Ref<boolean> => useState<boolean>('validateAuth', () => false)
/**
 * 页码
 */
export const usePageNum = ():Ref<number> => useState<number>('pageNum', () => 1)
/**
 * ParamsId
 */
export const useParamsId = ():Ref<string | null> => useState<string | null>('paramsId', () => null)
/**
 * QueryId
 */
export const useQueryId = ():Ref<string | null> => useState<string | null>('queryId', () => null)
/**
 * 登陆用户ID
 */
export const useLoginUserId = ():Ref<string | null> => useState<string | null>('loginUserId', () => null)

/**
 * 综合返回State
 */
export const states = () => {
    const menuOpen = useMenuOpen().value
    const auth = useValidateAuth().value
    const pageNum = usePageNum().value
    const paramsId = useParamsId().value
    const queryId = useQueryId().value
    const loginUserId = useLoginUserId().value
    return {
        menuOpen,
        auth,
        pageNum,
        paramsId,
        queryId,
        loginUserId
    }
}